/**
 * Project Name:九色鹿
 * File Name:ReqLogin.java
 * Package Name:com.fxp.project.jiuselu.web.models.sys.request
 * Date:2021-08-29 5:23 下午
 * Copyright (c) 2021, Jason.Wang All Rights Reserved.
 */
package com.fxp.project.jiuselu.web.models.user.request;

import com.fxp.project.jiuselu.web.base.request.ReqBase;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * ClassName: ReqLogin<br/>
 * Function: 登录请求的对象<br/>
 * Date: 2021-08-29 5:23 下午<br/>
 *
 * @author Jason.Wang
 * @version 1.0.0.0
 * @see
 * @since JDK 1.8
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class ReqLogin extends ReqBase {
    @Length(min = 11, max = 11, message = "必须输入11位的手机号码")
    @NotBlank(message = "当前手机号码不能为空")
    @Pattern(regexp = "^[1][3,5,6,7,8,9][0-9]{9}$", message = "请输入正确的手机号码")
    public String mobile;
    @Length(min = 4, max = 6, message = "必须输入4位长度的验证码")
    public String code;
    /**
     * 用户密码
     */
    private String password;
    /**
     * 登录类型，1 手机号+ 验证码 2 手机号 + 密码 3 微信登录 4 注册登录
     */
    @NotNull(message = "登录类型不能为空")
    private int type;
    /**
     * 用户的邀请码
     */
    private String invite;
    /**
     * 绑定的Id
     */
    private Long authId;

    private String companyName;

    private String invitecode;

    private String siteArea;

//    @NotNull(message = "用户登录还是代理人登录参数不能为空")
    private Integer status;

    private String openId;
}
